upstream {{ item.name }} {
    server {{ item.url }} max_fails=0;
}

server {
    listen       80;
    server_name  {{ item.host }};
    location / {
        proxy_pass http://{{ item.name }}/;
        proxy_connect_timeout 5;
    }
}